home *** CD-ROM | disk | FTP | other *** search
- // file : horn1.pop
- // this file describes a simple horn-form which uses egg-scaling to (hopefully),
- // allow for a variety of more elegant, (ie. "spindly"), forms than usual.
- // the forms produced by this script are all fairly 'straight' looking, and
- // the segments do not change size along the spine.
-
-
- /////////////////////////////////
- // population display settings //
- /////////////////////////////////
-
- population 0
- dimensions = 1
- colour_model RGB
- render_quality flat
-
-
- ////////////
- // genome //
- ////////////
-
- genome 0 {
-
- ////////////////
- // initialise //
- ////////////////
-
- // initialise scaling
- eggScale( 1 : 0.5 : 1 ), // allow smaller primitives than standard
-
- // initialise material properties
- setColour( hsv<.5,.5,.75> : hsv<0,.2,.5> : hsv<.99999,.99999,.99999> ),
- setTexture( norder false:toggle ),
- setBitmap( norder 0 : 0 : 20 ),
- *setWrap( norder 0 : 0 : 2 ),
-
- ///////////////
- // horn loop //
- ///////////////
-
- repeat( 1 : 1 : 60, // #horn-segments
-
- // horn-segment code is made up of 2 distinct code blocks; the first block is executed
- // within a new scope, called the "segment rib"; the second block is executed within
- // the current scope and is called the "segment spine"
- join(
-
- /////////
- // rib //
- /////////
-
- // in this horn the rib visually consists of a single primtive
- *scope(
- // rotate so that rib does not point in same direction as the spine
- rotate( <0,0,0> : <-2,-2,-2> : <2,2,2> ),
- // move away from spine slightly
- forward( 0 : -2 : 2 ),
- // re-shape primitive
- eggVectorScale( <1,1,1> : <.75,.75,.75> : <1.25,1.25,1.25> ),
- // determine primitive type and lay an egg
- egg( 0 : 0 : 10 ),
- lay
- ),
-
- ///////////
- // spine //
- ///////////
-
- // in this horn the spine has no visual form, but simply updates the turtle
- // state ready for the next segment
- forward( 0.3 : -1 : 1 ),
- scale( 1.05 : 1.01 : 1.1 ),
- bankLeft( dtor(10 : -25 : 25) ),
- moveHue( 0.01 : 0.005 : 0.05 )
- )
- )
- }
-
-
- // eof : horn1.pop
-
-